{extend name="$_tpl_public_layout_ace"/}


{block name="breadcrumb"}
<ul class="breadcrumb">
	<li><i class="fa fa-home home-icon"></i><a href="{:url('admin/index/index')}">{$configInfo['site_title']}</a></li>
	<li><a href="{:url('seatsel_manage/voucher/index')}">{$sideName}</a></li>
</ul>
{/block}


{block name="pageheader"}
<h1>
	{$sideName}
</h1>
{/block}


{block name="content"}
<div class="mb10">
	<a href="{:url('seatsel_manage/voucher/add')}" class="btn btn-primary btn-sm"><i class="fa fa-pencil align-top bigger-125"></i> 添加</a>
</div>

<form class="">
	<table class="table table-striped table-bordered table-hover dataTables-table">
		<thead>
			<tr>
				<th width="76">序号</th>
				<th width="80">类型</th>
				<th>名称</th>
				<th>面额</th>
				<th>库存</th>
				<th width="146">创建时间</th>
				<th width="60">状态</th>
				<th width="60">查看优惠券</th>
				<th width="60">查看用户</th>
				<th width="120">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="list" id="vo"}
			<tr>
				<td>{$vo['id']}</td>
				<td>{$vo['type_show']}</td>
				<td>{$vo['name']}</td>
				<td>{$vo['real_amount']}</td>
				<td>{$vo['stock_num']}</td>
				<td>{$vo['create_time_show']}</td>
				<td>{$vo['status_show']}</td>
				<td>
					{if condition="$vo['type'] eq 2"}
						{if condition="$vo['is_generate']"}
							<a href="{:url('seatsel_manage/voucherCode/index', ['void'=>$vo['id']])}" class="btn btn-primary btn-xs">查看抵扣券</a>
							<div class="mt5"><a href="{:url('seatsel_manage/voucher/doClear', ['void'=>$vo['id']])}" class="btn btn-danger btn-xs J_layerConfirm" data-tip="确认清空码段吗？">清空</a></div>
						{else /}
							<a href="{:url('seatsel_manage/voucher/doGenerate', ['void'=>$vo['id']])}" class="btn btn-primary btn-xs J_layerConfirm" data-tip="确定预生成吗？">预生成</a>
						{/if}
					{/if}
				</td>
				<td>
					<a href="{:url('seatsel_manage/userVoucher/index', ['void'=>$vo['id']])}" class="btn btn-primary btn-xs">查看用户</a>
				</td>
				<td>
					<div>
						<a href="{:url('seatsel_manage/voucher/add', ['id'=>$vo['id']])}" class="btn btn-primary btn-xs">编辑</a>
						<a href="{:url('seatsel_manage/voucher/doDelete', ['id'=>$vo['id']])}" class="btn btn-danger btn-xs J_layerConfirm" data-tip="确认删除吗？">删除</a>
					</div>
					<div class="mt5">
						<a href="{:url('seatsel_manage/voucher/getDemoUrl', ['void'=>$vo['id']])}" class="btn btn-success btn-xs J_layerPcDialog" data-tip="查看领取链接">领取链接</a>
					</div>
				</td>
			</tr>
			{/volist}
		</tbody>
	</table>
	<div class="dataTables-controll">
		<button type="submit" class="btn btn-success btn-sm J_ajaxSubmit">提交排序</button>
	</div>
</form>
<div class="dataTables-pages">{$pageShow}</div>
{/block}